//
//  HWLNetworkTool.h
//  FloatClouds
//
//  Created by 黄威 on 16/8/30.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^successBlock)(id result);
typedef void(^failureBlock)(NSError *error);

typedef NS_ENUM(NSUInteger, HWLResponseStyle) {
    HWLJSON,
    HWLDATA,
    HWLXML,
};

typedef NS_ENUM(NSUInteger, HWLRequestStyle) {
   HWLBodyString,
    HWLBodyJSON,
};

@interface HWLNetworkTool : NSObject

+(void)GET:(NSString *)url
   andBody:(id)body
 andHeader:(NSDictionary *)headers
andResponse:(HWLResponseStyle)responseStyle
andSuccessBlock:(successBlock)success
andFailureBlock:(failureBlock)failure;

+(void)POST:(NSString *)url
andBody:(id)body
andBodyStyle:(HWLRequestStyle)bodyStyle
andHeader:(NSDictionary *)headers
andResponse:(HWLResponseStyle)responseStyle
andSuccessBlock:(successBlock)success
andFailureBlock:(failureBlock)failure;

@end